package com.design.model;

/**
 *
 * 原型模式示例
 *
 * @author lw
 * @date 2023/12/1 14:49
 **/
public class PrototypeExample {

    public static void main(String[] args) {
        Shape shape = new Shape("圆形");

        Shape cloneShape = shape.clone();
        cloneShape.setType("克隆圆形");

        System.out.println(shape.getType());
        System.out.println(cloneShape.getType());
    }
}
